package cn.jiangjiesheng.bootstrap.database.properties;

import lombok.Data;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;


/**
 * Created by dev@jiangjiesheng.cn on 2021/9/10  <br/>
 *
 * @author dev@jiangjiesheng.cn
 */
@Data
@ConditionalOnMissingBean(name = "redisProperties")
@Configuration
@RefreshScope
@ConfigurationProperties(prefix = RedisProperties.prefix)
public class RedisProperties {

    public static final String prefix = "spring.redis";

    public boolean enable;

    private int database;

    private String host;
    private int port;
    private int timeout;
    private String password;
    private int maxActive;
    private int maxWait;
    private int maxIdle;
    private int minIdle;
    private int timeOut;
    private int maxTotal;
}
